-- GENERATED SPELL FOR [Ghostly Citizen] --


function spell0_10385(pUnit, Event) --@Haunting Phantoms,n/a--
pUnit:FullCastSpellOnTarget(16336,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10385', 2000, 1)
end

function spell1_10385(pUnit, Event) --@Slap!,n/a--
pUnit:FullCastSpellOnTarget(6754,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10385', 3280, 1)
end

function spell2_10385(pUnit, Event) --@Veil of Shadow,Heal--
pUnit:FullCastSpellOnTarget(7068,pUnit)
pUnit:RegisterEvent('Sorts_10385', 16500, 1)
end

function Sorts_10385(pUnit, Event)
local choix_sorts_10385 = math.random(0, 2)
if choix_sorts_10385 == 0 then
pUnit:RegisterEvent('spell0_10385', 1, 1)
end
if choix_sorts_10385 == 1 then
pUnit:RegisterEvent('spell1_10385', 1, 1)
end
if choix_sorts_10385 == 2 then
pUnit:RegisterEvent('spell2_10385', 1, 1)
end
end

function mob10385_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10385', math.random(1500, 3000), 1)
end

function mob10385_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10385_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10385_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10385, 1, 'mob10385_Action')
RegisterUnitEvent(10385, 2, 'mob10385_Leave')
RegisterUnitEvent(10385, 3, 'mob10385_Kill')
RegisterUnitEvent(10385, 4, 'mob10385_Die')
